package com.ruoyi.mall.product.domain.service.impl;

import java.util.List;

import com.ruoyi.mall.product.domain.service.IPmsCategoryBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.product.domain.repository.PmsCategoryBrandMapper;
import com.ruoyi.mall.product.domain.entity.PmsCategoryBrand;

/**
 * 品牌分类关联Service业务层处理
 *
 * @author zhangqishu
 * @date 2022-05-25
 */
@Service
public class PmsCategoryBrandServiceImpl implements IPmsCategoryBrandService
{
    @Autowired
    private PmsCategoryBrandMapper pmsCategoryBrandMapper;

    /**
     * 查询品牌分类关联
     *
     * @param id 品牌分类关联主键
     * @return 品牌分类关联
     */
    @Override
    public PmsCategoryBrand selectPmsCategoryBrandById(Long id)
    {
        return pmsCategoryBrandMapper.selectPmsCategoryBrandById(id);
    }

    /**
     * 查询品牌分类关联列表
     *
     * @param pmsCategoryBrand 品牌分类关联
     * @return 品牌分类关联
     */
    @Override
    public List<PmsCategoryBrand> selectPmsCategoryBrandList(PmsCategoryBrand pmsCategoryBrand)
    {
        return pmsCategoryBrandMapper.selectPmsCategoryBrandList(pmsCategoryBrand);
    }

    /**
     * 新增品牌分类关联
     *
     * @param pmsCategoryBrand 品牌分类关联
     * @return 结果
     */
    @Override
    public int insertPmsCategoryBrand(PmsCategoryBrand pmsCategoryBrand)
    {
        return pmsCategoryBrandMapper.insertPmsCategoryBrand(pmsCategoryBrand);
    }

    /**
     * 修改品牌分类关联
     *
     * @param pmsCategoryBrand 品牌分类关联
     * @return 结果
     */
    @Override
    public int updatePmsCategoryBrand(PmsCategoryBrand pmsCategoryBrand)
    {
        return pmsCategoryBrandMapper.updatePmsCategoryBrand(pmsCategoryBrand);
    }

    /**
     * 批量删除品牌分类关联
     *
     * @param ids 需要删除的品牌分类关联主键
     * @return 结果
     */
    @Override
    public int deletePmsCategoryBrandByIds(Long[] ids)
    {
        return pmsCategoryBrandMapper.deletePmsCategoryBrandByIds(ids);
    }

    /**
     * 删除品牌分类关联信息
     *
     * @param id 品牌分类关联主键
     * @return 结果
     */
    @Override
    public int deletePmsCategoryBrandById(Long id)
    {
        return pmsCategoryBrandMapper.deletePmsCategoryBrandById(id);
    }
}
